package com.common.common;

import lombok.Data;

@Data
public class Response {

    private String code = "200";
    private String msg = "success";
    public Response() {
    }

    public static Response success(String msg) {
        return new Response(msg);
    }

    public static Response success() {
        return new Response("操作成功！");
    }

    public static Response successDel() {
        return new Response("删除成功！");
    }

    public static Response successEdit() {
        return new Response("修改成功！");
    }

    public static Response successSave() {
        return new Response("保存成功！");
    }

    public Response(String code , String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Response(String msg) {
        this.msg = msg;
    }

}
